package com.example.demo.controller;

import com.example.demo.config.SMTPConfig;
import com.example.demo.config.SendmailConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wen.gao on 2018/5/6.
 */
//@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    public SendmailConfig sendmailConfig;

    @Autowired
    private SMTPConfig smtpConfig;

    @GetMapping("/sendmailConfig")
    public String sendmailConfig() {
        return sendmailConfig.getIP() + ":" + sendmailConfig.getPort();
    }
    @GetMapping("/smtpConfig")
    public String smtpConfig() {
        return smtpConfig.getIP() + ":" + smtpConfig.getPort();
    }


}
